encoder = Encoder().to(device)
enc_inputs = torch.tensor([[1, 2, 3, 5, 0],
                                [1, 2, 3, 4, 0]])
# enc_inputs维度：[batch_size, src_len] (2,5)
enc_outputs = encoder(enc_inputs)
# enc_outputs:[batch_size, src_len, d_model]  (2,5,512)  
